/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ScannerParser;

import java.util.*;
/**
 *
 * @author jefoutta
 */
public class Method extends Symbol{

    public Method(String tname, String ttype){
        this.name = tname;
        this.type = ttype;
        this.typeSymbol = "method";
        this.parameters = new LinkedList();
        SymbolTable.actualSymbolTable.addChildSymbolTable(2,this.typeSymbol+"_"+this.name);
    }

    public LinkedList<Symbol> getParameters(){
        return this.parameters;
    }

    public String toString(){
        return "Method "+ this.type + " "+this.name+" P"+this.position + this.getParametersType()+" T"+this.width;
    }
}
